From 31ef5116d4d1a97d41278000026968e928252a0f Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 14 Jan 2009 19:39:56 +0000 Subject: [PATCH] Instead of an arbitrary threshold, use one hundredth of the channel * babl/babl.h (BABL_ALPHA_THRESHOLD): Instead of an arbitrary threshold, use one hundredth of the channel intensity resolution when using 16 bit integers i.e. 0.01 / (2^16 - 1). svn path=/trunk/; revision=360 --- ChangeLog | 6 ++++++ babl/babl.h | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d96a0cd..b526a9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-14 Martin Nordholts + + * babl/babl.h (BABL_ALPHA_THRESHOLD): Instead of an arbitrary + threshold, use one hundredth of the channel intensity resolution + when using 16 bit integers i.e. 0.01 / (2^16 - 1). + 2008-12-08 Martin Nordholts * babl/babl-internal.h (babl_assert): Don't just eek when an diff --git a/babl/babl.h b/babl/babl.h index 71d94c3..1788d2f 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -46,9 +46,11 @@ typedef struct _BablList BablList; #define BABL_MAGIC 0xbAb100 /* Alpha threshold used in the reference implementation for - * un-pre-multiplication of color data. + * un-pre-multiplication of color data: + * + * 0.01 / (2^16 - 1) */ -#define BABL_ALPHA_THRESHOLD 0.0001 +#define BABL_ALPHA_THRESHOLD 0.000000152590219 enum { BABL_INSTANCE = BABL_MAGIC, -- 2.30.2